#ifndef SINMAIN_H
#define SINMAIN_H

#include <QMainWindow>
#include <QPointF>
#include<QVector3D>

namespace Ui {
class Sinmain;
}
class face
{
public:
    QVector<QVector3D>faces;
};
class triangles
{
public:
    QVector<QVector3D>triangle;
};
class Sinmain : public QMainWindow
{
    Q_OBJECT

public:
    explicit Sinmain(QWidget *parent = 0);
    ~Sinmain();
    float convertToGrayscale(int r,int g,int b);
    float normalizeValue(float val,float from,float to);
    void getModelAreas();
    void getImageHeights(QImage src);
    void areasToTriangles();
    void createASCIISTL();

private slots:
    void on_openPic_clicked();

    void on_generateCube_clicked();

    void on_exportSTL_clicked();

private:
    Ui::Sinmain *ui;
    QVector <float>map_pix;
    QVector <face>cubes;
    QVector<triangles>triangle_out;
    QImage global_pic;
};

#endif // SINMAIN_H
